#ifndef VEHICLE_API_UTILS_H
#define VEHICLE_API_UTILS_H

#include "game.h"

#include <Common\Visualize\Shape\hkDisplayGeometry.h>
#include <Common\Base\Types\Geometry\hkStridedVertices.h>

#include <Physics\Collide\Shape\Convex\ConvexVertices\hkpConvexVerticesShape.h>

#include <Physics\Vehicle\Camera\hkp1dAngularFollowCamCinfo.h>
#include <Physics\Vehicle\Camera\hkp1dAngularFollowCam.h>

#include <Graphics/Common/Input/Pad/hkgPad.h>

class hkDisplayGeometry;
class hkpConvexVerticesShape;

class VehicleApiUtils {
public:
	VehicleApiUtils();

	static void HK_CALL syncDisplayWheels(hkpVehicleInstance& vehicle, const hkArray<int>& wheels, int tag);
	static void HK_CALL createDisplayWheels(int tag, int displayId, hkReal radius = 0.4f, hkReal thickness = 0.2f);
	static void HK_CALL steer(int accelerate, int steer, hkgPad* pad, hkReal& inputX, hkReal& inputY, hkpVehicleInstance& vehicle, hkReal timestep);
	static hkpConvexVerticesShape* HK_CALL createCarChassisShape();
	static void HK_CALL reorient(hkBool buttonPressed, hkpAction* action, hkpWorld* world);
	static hkp1dAngularFollowCam::CameraOutput HK_CALL updateCamera(const hkpRigidBody& vehicleChassis, hkReal timestep, hkp1dAngularFollowCam& camera);
	static void HK_CALL VehicleApiUtils::createCamera( hkp1dAngularFollowCam& camera );

private:
	static hkpShape* HK_CALL createDisc(hkReal radius, hkReal thickness, int numSides = 10);
	static void HK_CALL createDisplayWheel(hkArray<hkDisplayGeometry*>& displayGeometry, hkReal radius = 0.3f, hkReal thickness = 0.1f);
};

#endif